package com.power.sifa.net.service.impl;

import com.plf.common.domain.BasePageInfo;
import com.plf.core.base.service.Ha_entityormService;
import com.power.sifa.net.dao.Lu_entityormDao;
import com.power.sifa.net.service.Lu_entityormService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Service
public class Lu_entityormServiceImpl implements Lu_entityormService {
	@Resource
	private Lu_entityormDao lu_entityormDao;

	@Resource
	private Ha_entityormService ha_entityormService;


	@Override
	public <T> List<T> findList(Class<T> clazz, Map<String, Object> params, BasePageInfo pageInfo) {
		return lu_entityormDao.findList(clazz, params, pageInfo);
	}

	@Override
	public List  findClasslist(List<Class> clazzlist, String fieldname, Object fieldvalue) {
		List result = new ArrayList(10);
		for(Class cls : clazzlist) {
			result.add(this.ha_entityormService.findOne(cls, fieldname, fieldvalue));
		}
		return result;
	}

}
